using System;
using System.Collections.Generic;
using System.Text;
using Castle.MonoRail.Framework;
using Castle.ActiveRecord.Framework;
using Castle.ActiveRecord;

namespace WineCellar.Common.Controllers
{
    [ControllerDetails("Setup")]
    public class SetupController : Controller
    {
        public void CreateSchema()
        {
            ActiveRecordStarter.CreateSchema();
            RenderText("Schema created successfully.");
            CancelView();
        }
        public void DropSchema()
        {
            ActiveRecordStarter.DropSchema();
            RenderText("Schema dropped successfully.");
            CancelView();
        }
    }
}
